import { createApp } from 'vue';
import VueGridLayout from 'vue-grid-layout';
import ElementPlus from 'element-plus';
import dayjs from 'dayjs';
import ImagesUpload from '/@/components/imageUpload/index.vue';
import ImageUploadCOS from '/@/components/ImageUploadCOS/index.vue';
import ImageUploadDraggableCOS from '/@/components/ImageUploadDraggableCOS/index.vue';
import FileUpload from '/@/components/fileUpload/index.vue';
import Pagination from '/@/components/pagination/index.vue';
import RightToolbar from '/@/components/rightToolbar/index.vue';
import { directive } from '/@/directive/index';
import { i18n } from '/@/i18n/index';
import pinia from '/@/stores/index';
import router from '/@/router';
import other from '/@/utils/other';
import App from '/@/App.vue';

import '/@/theme/index.scss';

const app = createApp(App);

directive(app);
other.elSvg(app);

app.provide('dayjs', dayjs)
app
	.component('ImagesUpload', ImagesUpload)
	.component('ImageUploadCOS', ImageUploadCOS)
	.component('ImageUploadDraggableCOS', ImageUploadDraggableCOS)
	.component('FileUpload', FileUpload)
	.component('PaginationComponent', Pagination)
	.component('RightToolbar', RightToolbar)
	.use(pinia)
	.use(router)
	.use(ElementPlus)
	.use(i18n)
	.use(VueGridLayout)
	.mount('#app');
